﻿using System;
using System.Collections.Generic;
using System.Text; 
using T.FAS.Runtime.Metadata.Entity;
using T.ServiceComponent.DataAccessEx.Core;
using T.ServiceComponent.Error;
using T.ServiceComponent.Monitor.Client;
using T.ServiceComponent.Runtime.Common;
using System.Transactions;
using T.FAS.Runtime.Base.Entity;

namespace T.FAS.Runtime.DataModel.Plugin
{
    /// <summary>
    /// 数据建模元数据SQL Build工厂
    /// </summary>
    public class SQLBuildFactory
    {
        private static Dictionary<MetadataType, IBusinessSQLBuilderFactory> buildFactory
            = new Dictionary<MetadataType, IBusinessSQLBuilderFactory>
            {
                { MetadataType.DB,  new DatabaseSQLBuilderFactory()},
                { MetadataType.DO,  new DataObjectSQLBuilderFactory()}, 
            };

        public static IMetaBusinessSQLBuilder GetMetaBusinessSQLBuilder(DatabaseType dBType, MetadataType metadataType)
        {
            return buildFactory[metadataType].GetBusinessSQLBuilder(dBType);
        }
    } 

    
}
